package com.nervenets.shopping.controller.order.params;

import com.nervenets.general.exception.LogicException;
import com.nervenets.general.web.params.FormParams;
import com.nervenets.shopping.hibernate.domain.order.GroupBuyOrder;
import com.nervenets.shopping.service.GroupBuyOrderService;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Setter
@Getter
@AllArgsConstructor
@SuperBuilder
public class GroupBuyOrderFormParams extends FormParams<GroupBuyOrder, GroupBuyOrderService> {
    @Override
    public GroupBuyOrder validateAndBuild(GroupBuyOrderService service, HttpServletRequest request, HttpServletResponse response) {
        throw new LogicException("此接口不支持新建，请调用拼团接口。");
    }
}
